<template>
  <div>
    <el-container style="height: 500px; border: 1px solid #eee">
      <!--菜单栏-->
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu>
          <el-menu

            class="el-menu-vertical-demo"
            :router=true
            @open="handleOpen"
            @close="handleClose">

            <el-menu-item index="/index/student">
              <i class="el-icon-menu"></i>
              <span slot="title">学生信息</span>
            </el-menu-item>
            <el-menu-item index="/index/teacher" >
              <i class="el-icon-document"></i>
              <span slot="title">老师信息</span>
            </el-menu-item>
            <el-menu-item index="3">
              <i class="el-icon-setting"></i>
              <span slot="title">导航四</span>
            </el-menu-item>
          </el-menu>
        </el-menu>

      </el-aside>

      <!--头部栏-->
      <el-container>
        <el-header style="text-align: right; font-size: 12px">
          <el-dropdown>
            <i class="el-icon-setting" style="margin-right: 15px"></i>
            <el-dropdown-menu slot="dropdown">


            </el-dropdown-menu>
          </el-dropdown>
          <span>王小虎</span>
        </el-header>
        <el-main>

          <!--<el-calendar v-model="value">-->
          <!--</el-calendar>-->
          <!--加载子页面-->
          <router-view></router-view>

        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>


  export default {
    name: "index",

    data() {
      return {


      }
    },
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
      go: function (url) {

        this.$router.push(url)
      },

    }


  };
</script>

<style scoped>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }

  .el-aside {
    color: #333;
  }
</style>
